<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<head>
<title>首页</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
	<div id="content">
		<section class="content-header">
			<h1>
				<i class="fa fa-cogs"></i> <strong>售后计划</strong>
			</h1>
			<ol class="breadcrumb">
				<li><a href="#"><i class="fa fa-home "></i>Home</a></li>
				<li>售后管理</li>
				<li class="active">售后计划</li>
			</ol>
		</section>
		<!-- Main content -->
		<section class="content">
			<div class="row">
				<div class="col-md-12">
					<div class="box box-info">
						<div class="box-header with-border">
							<i class="fa fa-th-list"></i>
							<h4 class="box-title">售后计划</h4>
						</div>
						<div class="box-body">
							<input type="hidden" id="contractID" name="contractID"
								th:value="${contract.id}" /> <input class="form-control"
								type="hidden" id="deviceID" name="deviceID" />
							<table class="table table-bordered">
								<tbody>
									<tr class="odd gradeX">
										<td width="8%" align="center" style="vertical-align: middle">合同号</td>
										<td width="17%">
											<div class="col-md-11">
												<input class="form-control" type="text" id="supplierCode"
													name="supplierCode" th:value="${contract.supplierCode}"
													readonly="readonly" />
											</div>
											<div class="col-md-1">
												<span style="color: #F00"></span>
											</div>
										</td>
										<td width="15%" align="center" style="vertical-align: middle">签订日期</td>
										<td width="15%">
											<div class="col-md-11">
												<input class="form-control" type="date" id="signedDate"
													name="signedDate" readonly="readonly"
													th:value="${#dates.format(contract.signedDate,'yyyy-MM-dd')}" />
											</div>
											<div class="col-md-1">
												<span style="color: #F00"></span>
											</div>
										</td>
										<td width="8%" align="center" style="vertical-align: middle">订货单位</td>
										<td width="17%">
											<div class="col-md-11">
												<input class="form-control" type="text" id="orderUnit"
													name="orderUnit" readonly="readonly"
													th:value="${contract.orderUnit}" />
											</div>
											<div class="col-md-1">
												<span style="color: #F00"></span>
											</div>
										</td>
									</tr>
									<tr class="even gradeC">
										<td width="8%" align="center" style="vertical-align: middle">项目名称</td>
										<td colspan="5">
											<div class="col-md-11">
												<input class="form-control" type="text" id="projectName"
													name="projectName" readonly="readonly"
													th:value="${contract.projectName}" />
											</div>
											<div class="col-md-1">
												<span style="color: #F00"></span>
											</div>
										</td>
									</tr>
									<tr>
										<td width="8%" align="center" style="vertical-align: middle">订货地址</td>
										<td colspan="5">
											<div class="col-md-11">
												<input class="form-control" type="text" id="orderAddress"
													name="orderAddress" readonly="readonly"
													th:value="${contract.orderAddress}" />
											</div>
											<div class="col-md-1">
												<span style="color: #F00"></span>
											</div>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="box-header with-border">
							<i class="fa fa-th-list"></i>
							<h4 class="box-title">设备明细及合同总计划</h4>
						</div>
						<div id="container" class="widget-title">
							<ul class="nav nav-tabs" id="myTabs">
								<li><a data-toggle="tab" class="active" href="#tab1"><span>设备细目</span></a></li>
								<li><a data-toggle="tab" href="#tab2"><span>总计划</span></a></li>
							</ul>
						</div>
						<div class="pre-scrollable1">
							<div class="widget-content tab-content">

								<div id="tab1" class="active tab-pane">
									<table id="resultDeviceTable"
										class="mytable dataTable table-bordered text-center table-striped table-hover"
										cellspacing="0" width="100%">
										<thead>
											<tr>
												<th width="10%">序号</th>
												<th width="12%">操作</th>
												<th width="12%">产品型号</th>
												<th width="12%">产品类型</th>
												<th width="12%">产品名称</th>
												<th width="12%">细分类型</th>
												<th width="10%">设备编号</th>
												<th width="10%">出厂时间</th>
												<th width="10%">有无方案</th>
											</tr>
										</thead>
										<tbody>
										</tbody>
									</table>
								</div>
								<div id="tab2" class="tab-pane">
									<table id="planTable"
										class="mytable dataTable table-bordered text-center table-striped table-hover"
										cellspacing="0" width="100%">
										<thead>
											<tr>
												<th width="7%">序号</th>
												<th width="20%">设备名称</th>
												<th width="10%">开始时间</th>
												<th width="13%">维护周期（天）</th>
												<th width="20%">维护项目</th>
												<th width="20%">注意事项</th>
												<th width="10%">备注</th>
											</tr>
										</thead>
										<tbody>
										</tbody>
									</table>
								</div>
							</div>
						</div>
						
						<div class="form-inline">
							<div class="form-group">
								<div class="box-header with-border">
									<i class="fa fa-th-list"></i>
									<h4 class="box-title">维护计划&nbsp; <input style="border: 0;" type="text" id="showCode"
										name="showCode" readonly="readonly" /></h4>
									
								</div>
							</div>
							
						</div>
						<div class="box-body">
						    <div class="btn-group pull-right">
								<button type="button" class="btn btn-info addItemBtn">添加</button>
								<button type="button" class="btn btn-info editItemBtn">编辑</button>
								<button type="button" style="margin-right: 10px;"
									class="btn btn-info delItemBtn">删除</button>
							</div>
							<table id="resultItemTable"
								class="mytable dataTable table-bordered text-center table-striped table-hover"
								cellspacing="0" width="100%">
								<thead>
									<tr>
										<th width="10%">序号</th>
										<th width="15%"><input type="checkbox" id="checkAllItem" /></th>
										<th width="15%">维护周期（天）</th>
										<th width="15%">维护项目</th>
										<th width="20%">注意事项</th>
										<th width="25%">备注</th>
									</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
						</div>
					</div>
					<!--<div class="box-body">-->
					<!--<div class="form-horizontal">-->
					<!--<div class="form-group">-->
					<!--<label class="col-sm-1 control-label">备注</label>-->
					<!--<div class="col-sm-11">-->
					<!--<input class="form-control" type="text" name="contractMemo" id="contractMemo" th:value="${memo}" />-->
					<!--</div>-->
					<!--</div>-->
					<!--</div>-->
					<!--</div> -->
					<div class="box-body">
						<a type="button" class="btn btn-default resetBtn pull-right"
							href="javascript:history.go(-1)">返回</a>
						<!--<button class="btn btn-info pull-right saveContractPlanBtn">保存</button>-->
					</div>
				</div>
			</div>
		</section>

		<!--维护方案选择弹窗-->
		<div class="modal" id="selectSchemeModal">
			<div class="modal-dialog" role="dialog">
				<div class="modal-content">
					<form id="selectSchemeAtrrForm">
						<input class="form-control" type="hidden" id="selectDeviceID"
							name="selectDeviceID" />
						<input type="hidden" name='leaveFactoryCode' id="leaveFactoryCode"/>
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
							<h4 class="modal-title">
								<strong>选择维护方案</strong>
							</h4>
						</div>
						<div class="modal-body">
							<div class="form-inline">
								<div class="input-group">
									<input type="text" id="keyScheme" class="form-control"
										style="width: 240px;" placeholder="Search..." /> <span
										class="input-group-btn">
										<button type="button" class="btn btn-info searchSchemeBtn">查询</button>
										<button type="button" class="btn btn-info resetSchemeBtn">撤消</button>
									</span>
								</div>
							</div>
							<table id="resultSchemeTable"
								class="table table-bordered table-condensed data-table mytable"
								cellspacing="0" width="100%">
								<thead>
									<tr>
										<th class="center" width="10%">序号</th>
										<th class="center" width="10%">选择</th>
										<th class="center" width="20%">方案名称</th>
										<th class="center" width="20%">方案编号</th>
										<th class="center" width="20%">设备分类</th>
										<th class="center" width="20%">设备型号</th>
									</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
						</div>
						<div class="modal-footer">
							<!-- <button type="button" class="btn btn-primary saveSelectBtn">确定</button> -->
							<button type="button" class="btn btn-default"
								data-dismiss="modal">返回</button>
						</div>
					</form>
				</div>
			</div>
		</div>

		<!--维护计划新增/编辑弹窗-->
		<div class="modal" id="maintainItemModal">
			<div class="modal-dialog" role="dialog">
				<div class="modal-content">
					<form id="maintainItemAtrrForm">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
							<h4 class="modal-title">
								<strong>维护计划信息</strong>
							</h4>
						</div>
						<div class="modal-body">
							<input type="hidden" name="itemId" id="itemId" />
							<div class="widget-content nopadding">
								<table class="table table-bordered">
									<tbody>
										<tr class="odd gradeX">
											<td width="15%" align="center" style="vertical-align: middle">维护周期</td>
											<td width="35%"><div class="col-md-11">
													<div class="input-group">
														<input class="form-control" type="text"
															name="maintainPeriod" id="maintainPeriod" datatype="d"
															errormsg="请输入整数" /> <span class="input-group-addon">天</span>
													</div>
												</div>
												<div class="col-md-1">
													<span style="color: #F00"></span>
												</div></td>
											<td width="15%" align="center" style="vertical-align: middle">维护项目</td>
											<td width="35%">
												<div class="col-md-11">
													<input class="form-control" type="text"
														name="maintainProject" id="maintainProject"
														style="width: 100%" />
												</div>
												<div class="col-md-1">
													<span style="color: #F00"></span>
												</div>
											</td>
										</tr>
										<tr class="even gradeC">
											<td width="15%" align="center" style="vertical-align: middle">注意事项</td>
											<td colspan="3"><div class="col-md-11">
													<textarea class="form-control" type="text"
														name="announcement" id="announcement" style="width: 100%"></textarea>
												</div>
												<div class="col-md-1">
													<span style="color: #F00"></span>
												</div></td>
										</tr>
										<tr class="even gradeC">
											<td width="15%" align="center" style="vertical-align: middle">备注</td>
											<td colspan="3"><div class="col-md-11">
													<textarea class="form-control" type="text" name="memo"
														id="memo" style="width: 100%"></textarea>
												</div>
												<div class="col-sm-1" align="center"
													style="vertical-align: middle">
													<span style="color: #F00"></span>
												</div></td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-primary saveItemBtn">确定</button>
							<button type="button" class="btn btn-default"
								data-dismiss="modal">返回</button>
						</div>
					</form>
				</div>
			</div>
		</div>

		<script th:src="@{/afterSalePlan/planindex.js}"></script>
		<script th:src="@{/afterSalePlan/planDevice.js}"></script>
		<script th:src="@{/afterSalePlan/planScheme.js}"></script>
	</div>

</body>
</html>

